how to take input from user in java without using scanner